-
Notifications
You must be signed in to change notification settings - Fork 161
Recovery phrase unverified status based on last_authentication.
#3519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recovery phrase unverified status based on last_authentication.
#3519
Conversation
…recovery-phrase' into sea-snake/persistent-unverified-recovery-phrase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the recovery phrase verification system to support two verification methods: selecting words from a shuffled list (when the phrase is in memory) and typing the entire phrase (when signing in again after sign-out). The key change is using last_authentication field to determine if a recovery phrase has been verified (null = unverified).
- Renamed
Verifycomponent toVerifySelectingand created newVerifyTypingcomponent for manual phrase entry - Implemented reusable
RecoveryPhraseInputcomponent with accessibility features and validation - Updated verification logic to call the canister with the recovery phrase identity to mark it as used
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/frontend/src/routes/(new-styling)/manage/(authenticated)/(access-and-recovery)/recovery/+page.svelte |
Updates unverified status detection to use last_authentication field; implements handleVerify to authenticate with recovery phrase and mark as used |
src/frontend/src/lib/components/wizards/createRecoveryPhrase/views/VerifyTyping.svelte |
New component for manual recovery phrase entry with auto-submit and validation |
src/frontend/src/lib/components/wizards/createRecoveryPhrase/views/VerifySelecting.svelte |
Minor text formatting change adding colon to instruction |
src/frontend/src/lib/components/wizards/createRecoveryPhrase/views/Retry.svelte |
Adds verification method prop to show different error messages for selecting vs typing |
src/frontend/src/lib/components/wizards/createRecoveryPhrase/CreateRecoveryPhraseWizard.svelte |
Adds action prop and error handling; routes between VerifySelecting and VerifyTyping based on phrase availability |
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte |
New reusable component for entering 24-word recovery phrase with paste support, keyboard navigation, and validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../src/routes/(new-styling)/manage/(authenticated)/(access-and-recovery)/recovery/+page.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/wizards/createRecoveryPhrase/CreateRecoveryPhraseWizard.svelte
Show resolved
Hide resolved
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/wizards/createRecoveryPhrase/views/VerifyTyping.svelte
Outdated
Show resolved
Hide resolved
.../src/routes/(new-styling)/manage/(authenticated)/(access-and-recovery)/recovery/+page.svelte
Outdated
Show resolved
Hide resolved
.../src/routes/(new-styling)/manage/(authenticated)/(access-and-recovery)/recovery/+page.svelte
Show resolved
Hide resolved
…access-and-recovery)/recovery/+page.svelte Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
.../src/routes/(new-styling)/manage/(authenticated)/(access-and-recovery)/recovery/+page.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte
Outdated
Show resolved
Hide resolved
src/frontend/src/lib/components/views/RecoveryPhraseInput.svelte
Outdated
Show resolved
Hide resolved
aterga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving modulo tests (feel free to add them in a follow up PR, since this feature is disabled)
Recovery phrase unverified status based on
last_authentication.Changes
Verifycomponent toVerifySelecting.RecoveryPhraseInputcomponent.VerifyTyping.RecoveryPhraseWizardto use eitherVerifySelectingorVerifyTypingdepending on the availability of the valid recovery phrase in memory (e.g. user signed out and in -> not available)./manage/recoverypage to uselast_authenticationto decide if a recovery phrase is unverified (null = not used yet).Tests
No tests have been updated in this PR, existing e2e tests should pass in the CI/CD pipeline.
Notes
RecoveryPhraseInputcomponent will be used on theuse recovery phrase screenin a later PR.VerifyTypingwill be added in a later PR.